package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 商品对象 sys_food
 *
 * @author mars
 * @date 2024-04-15
 */

@Data
@ApiModel(value = "商品对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_food")
public class SysFood {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 食物名称
     */
    @Excel(name = "食物名称")
    @ApiModelProperty(value = "食物名称")
    private String name;
    /**
     * 食物类型
     */
    @Excel(name = "食物类型")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "食物类型")
    private Long foodType;

    @TableField(exist = false)
    @ApiModelProperty(value = "食物类型")
    private String foodTypeName;
    /**
     * 热量（卡路里）
     */
    @Excel(name = "热量")
    @ApiModelProperty(value = "热量（卡路里）")
    private int heat;
    /**
     * 价格
     */
    @Excel(name = "价格")
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
    /**
     * 图片
     */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")
    private String picture;
    /**
     * 份量
     */
    @Excel(name = "份量")
    @ApiModelProperty(value = "份量")
    private String weight;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;

    @TableField(exist = false)
    @ApiModelProperty(value = "数量")
    private Integer amount;
}
